import request from '@/utils/request'

// 获取用户地址列表
export function GetUserAddressList(params) {
  return request({
    url: '/useraddress/get_user_address_list',
    method: 'get',
    params
  })
}
// 修改一个客户地址
export function PutEditUserAddress(params) {
  return request({
    url: '/useraddress/edit_user_address/' + params.user_address_id,
    method: 'put',
    params
  })
}
// 新增一个客户地址
export function PostAddUserAddress(data) {
  return request({
    url: '/useraddress/add_user_address',
    method: 'post',
    data
  })
}
// 删除一个客户地址
export function putDelUserAddress(params) {
  return request({
    url: '/useraddress/del_user_address/' + params.user_address_id,
    method: 'put',
    params
  })
}
// 设置一个客户地址为默认地址
export function putSetUserAddressDefault(data) {
  return request({
    url: '/useraddress/set_user_address_default/' + data.user_address_id,
    method: 'put',
    data
  })
}
